GetChildrenForPage(Guid,Predicate<PageIndexItem>) Method

Example 

Gets all children under a particular page that matches the predicate. This can be used to only list pages that should be visible in a menu, or that matches any other criteria.

Syntax

'Declaration
 
Public Overloads Shared Function GetChildrenForPage( _
   ByVal pageId As Guid, _
   ByVal match As Predicate(Of PageIndexItem) _
) As PageCollection
public static PageCollection GetChildrenForPage( 
   Guid pageId,
   Predicate<PageIndexItem> match
)

Parameters

pageId
match

Remarks

This function returns a PageCollection which can be itterated through or further filtered and sorted. The difference by using the predicate as a parameter rather than a where-clause on the collection is that it will perform on a simpler structure and thus be more efficient.

Example

To get all children for a page that has been set to be visible in menus.
PageFactory.GetChildrenForPage(myPage, p => p.VisibleInMenu);

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

This documentation was created using Document! X from Innovasys